<?php /* Smarty version Smarty-3.1.21-dev, created on 2018-04-09 15:52:59
         compiled from "/data/wwwroot/61kq.com/uploads/app/template/admin/admin_tgjob.htm" */ ?>
<?php /*%%SmartyHeaderCode:13035048005acb1bdb04d0d4-25876195%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '901bd42529060346656135b1e294a52522abf12a' => 
    array (
      0 => '/data/wwwroot/61kq.com/uploads/app/template/admin/admin_tgjob.htm',
      1 => 1517227402,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '13035048005acb1bdb04d0d4-25876195',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'config' => 0,
    'pytoken' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_5acb1bdb0fa921_25587573',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5acb1bdb0fa921_25587573')) {function content_5acb1bdb0fa921_25587573($_smarty_tpl) {?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
" rel="stylesheet" type="text/css" />
<link href="images/system.css?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
" rel="stylesheet" type="text/css" /> 
<link href="images/table_form.css?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
" rel="stylesheet" type="text/css" />
<?php echo '<script'; ?>
 src="<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_weburl'];?>
/js/jquery-1.8.0.min.js?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 src="js/admin_public.js?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
" language="javascript"><?php echo '</script'; ?>
>
<link href="<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_weburl'];?>
/js/layui/css/layui.css?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
" rel="stylesheet">
<?php echo '<script'; ?>
 src="<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_weburl'];?>
/js/layui/layui.js?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
" language="javascript"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 src="<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_weburl'];?>
/js/layui/phpyun_layer.js?v=<?php echo $_smarty_tpl->tpl_vars['config']->value['cachecode'];?>
"><?php echo '</script'; ?>
>
<title>后台管理</title>
</head>
<body class="body_ifm">
<?php echo '<script'; ?>
>layui.use(['layer', 'form'], function(){
    var layer = layui.layer
    ,form = layui.form
    ,$ = layui.$;
	$("input[name='stype']").each(function(){
		$(this).next().click(function(){
			var val = $(this).prev().val();
			if(val=='1'){
				$(".tgemail").show();
				$(".tgmsg").hide();
				$("#sendnum").removeAttr('value');
				$("#content").removeAttr('value');
			}else{
				$(".tgmsg").show();
				$(".tgemail").hide();
				$("#sendnum").removeAttr('value');
				$("#email_title").removeAttr('value');
			}
		});
	});
	$("input[name='job']").each(function(){
		$(this).next().click(function(){
			var job = $(this).prev().val();
			var type=$("input[name=stype]:checked").val();
			var com=$("input[name=com]:checked").val();
			if(type=='1'){
				if(job==1){
					$("#email_title").attr('value','<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_webname'];?>
向您推送的最新职位');
				}else if (job==2){
					$("#email_title").attr('value','<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_webname'];?>
向您推送的推荐职位');
				}else if (job==3){
					$("#email_title").attr('value','<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_webname'];?>
向您推送的紧急职位');
				}
			}else{
				if(job==1){
					$("#content").val('<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_webname'];?>
向您推荐了符合您的最新职位，请点击<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_weburl'];?>
 ！查看详情');
				}else if (job==2){
					$("#content").val('<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_webname'];?>
向您推荐了符合您的推荐职位，请点击<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_weburl'];?>
 ！查看详情');
				}else if (job==3){
					$("#content").val('<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_webname'];?>
向您推荐了符合您的紧急职位，请点击<?php echo $_smarty_tpl->tpl_vars['config']->value['sy_weburl'];?>
 ！查看详情');
				}
			}
			if(job==2||job==3){
				var pytoken=$("input[name='pytoken']").val();
				$.post('index.php?m=email&c=getjob',{job:job,pytoken:pytoken},function(data){
					if(data<1){
						$(this).find(".iradio_flat-blue").addClass("checked");
						$(this).parent(".iradio_flat-blue").addClass("checked");
						if(job==2){
							 parent.layer.msg('没有推荐职位，无法推广！', 2, 8);return false;
						}else{
							 parent.layer.msg('没有紧急职位，无法推广！', 2, 8);return false;
						}
					}
				})
			}
		});
	});
	$("input[name='user']").each(function(){
		$(this).next().click(function(){
			var user = $(this).prev().val();
			var pytoken=$("input[name='pytoken']").val();
			$.post('index.php?m=email&c=getuser',{user:user,pytoken:pytoken},function(data){
				if(data){
					 $("#sendnum").val(data);
				}
			})
		});
	});
});
function chsend(){
    var user=$("input[name='user']:checked").val();
	if(!user){
		parent.layer.msg("请选择推广的用户！",2,8);return false;
	}
	var sendnum=$("#sendnum").val();
	if(sendnum<1){
	     parent.layer.msg("请输入需要发送的数量！",2,8);return false;
	}else if(sendnum>500){
	     parent.layer.msg("数量过多，第三方发送服务器将会影响。建议找专业的群发软件！",2,8);return false;
	}
    var job=$("input[name='job']:checked").val();
	if(!job){
		parent.layer.msg("请选择需要推广的职位！",2,8);return false;
	}
	var type=$("input[name=stype]:checked").val();
	if(type==1){
		var num=$("#num").val();
		if(num<1){
			parent.layer.msg("请输入需要推广的职位数量！",2,8);return false;
		}
	    var title=$("input[name='email_title']").val();
		if(title==''){
			parent.layer.msg("请输入邮件主题！",2,8);return false;
		}
	}else{
	    var content=$("#content").val();
		if(content==''){
			parent.layer.msg("请输入短信内容！",2,8);return false;
		}
	}
	loadlayer();
}
<?php echo '</script'; ?>
>
<div class="infoboxp">
<div class="tabs_info">
    <ul>
      <li <?php if ($_GET['c']=='') {?>class="curr"<?php }?>><a  href="index.php?m=email">邮件推广</a></li>
      <li <?php if ($_GET['c']=='msgtg') {?>class="curr"<?php }?>><a href="index.php?m=email&c=msgtg">短信推广</a></li>
      <li <?php if ($_GET['c']=='tgresume') {?>class="curr"<?php }?> ><a href="index.php?m=email&c=tgresume">简历推广</a></li>
      <li <?php if ($_GET['c']=='tgjob') {?>class="curr"<?php }?> > <a href="index.php?m=email&c=tgjob">职位推广</a></li>
      <li <?php if ($_GET['c']=='email') {?>class="curr"<?php }?> ><a href="index.php?m=email&c=email">自定义邮件</a> </li><li<?php if ($_GET['c']=='msg') {?>class="curr"<?php }?>><a  href="index.php?m=email&c=msg">自定义短信</a></li>
    </ul>
  </div>
  <div class="clear"></div>
  <div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
    <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
    <div class="admin_new_tip_list_cont">
      <div class="admin_new_tip_list">发送短信时，请选择合适的时间进行发送</div>
    </div>
  </div>
  <div class="clear"></div>
  <div class="tag_box mt10">
<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe> 
<form name="myform" action="index.php?m=email&c=sendjob" method="post" target="supportiframe" onsubmit="return chsend();" class="layui-form">
	<table width="100%" class="table_form">
       <tr >
       <tbody>
        <th bgcolor="#f0f6fb" colspan="2" ><span class="admin_bold">职位推广</span></th>
       </tbody>
      </tr 
	   <tr>
		    <th width="120">推送方式</th>
			<td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <input type="radio" value='1'  name="stype" id="radiostype_1" title="邮件" checked>
                   <input type="radio" value='2'  name="stype" id="radiostype_2" title="短信" >
                 </div>
               </div>
            </div>
		    </td>
		</tr>
		<tr>
        <th width="120">选择用户</th>
        <td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <input type="radio" value='1'  name="user" id="radiouser_1" title="最近七天刷新简历的个人">
                   <input type="radio" value='2'  name="user" id="radiouser_2" title="最近三天注册的个人" >
                 </div>
               </div>
            </div>
		</td>
		</tr>
		<tr class="admin_table_trbg">
			<th width="120">发送数量</th>
			<td><input class="input-text" type="text" name="sendnum" id="sendnum"/><font color="gray"></font><span class="admin_web_tip">注：如发送数量大于500，建议找专业的群发软件</span>
			</td>
		</tr>
		<tr>
		    <th width="120">选择职位</th>
			<td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <input type="radio" value='1'  name="job" id="radiojob_1" title="最新职位">
                   <input type="radio" value='2'  name="job" id="radiojob_2" title="推荐职位" >
                   <input type="radio" value='3'  name="job" id="radiojob_3" title="紧急职位" >
                 </div>
               </div>
            </div>
		    </td>
		</tr>
        <tr class="admin_table_trbg tgemail">
			<th width="120">推送职位数量</th>
			<td><input class="input-text" type="text" name="num" id="num"/><font color="gray"></font><span class="admin_web_tip">注：推送数量超过已有职位数量则按已有数量推广</span>
			</td>
		</tr>
		<tr class="admin_table_trbg tgemail">
			<th width="120">邮件主题</th>
			<td><input class="input-text" type="text" name="email_title" id="email_title" size="40" style="width:400px"/><font color="gray"></font>
			</td>
		</tr>
		<tr class="admin_table_trbg tgmsg" style="display:none">
			<th width="120">短信内容</th>
			<td>
            <textarea  id="content" name="content" cols="100" rows="8" class="web_text_textarea"></textarea>
            </td>
		</tr>
		<tr>
			<td align="center" colspan="2">
            <input class="layui-btn layui-btn-normal" type="submit" name="email_send" value="&nbsp;发 送&nbsp;"  />
     		<input class="layui-btn layui-btn-normal" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
     		</td>
		</tr>
	</table>
	<input type="hidden" name="pytoken" value="<?php echo $_smarty_tpl->tpl_vars['pytoken']->value;?>
">
</form>
</div>
</div>
</body>
</html><?php }} ?>
